package com.loubobooo.personal.blog.service;

import com.loubobooo.personal.blog.entity.Comment;
import com.loubobooo.personal.blog.entity.vo.CommentVO;
import com.loubobooo.personal.blog.entity.vo.CommentListVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface CommentService {
    //添加评论
    public void insertComment(HttpServletRequest request, Comment comment);

    //根据文章id获取评论列表
    public List<CommentVO> listCommentByArticleId(Integer status, Integer articleId);

    //根据id获取评论
    public CommentVO getCommentById(Integer id);

    //获取所有评论列表
    public List<CommentListVo> listCommentByPage(Integer status, Integer pageNo, Integer pageSize);

    //获得评论列表
    public List<CommentListVo> listCommentVo(Integer status);

    //获得评论列表
    public List<CommentVO> listComment(Integer status);

    //删除评论
    public void deleteComment(Integer id);

    //修改评论
    public void updateComment(Comment comment);

    //统计评论数
    public Integer countComment(Integer status);

    //获得最近评论
    public List<CommentListVo> listRecentComment(Integer limit);

    //获得评论的子评论
    public List<Comment> listChildComment(Integer id);

}
